{include file="inc/header.html"}
<?php
    $this->_var['dpagecss'][] = $this->_var['TMPL_REAL']."/css/shop-shop_shopping_cart.css";
	$this->_var['dcpagecss'][] = $this->_var['TMPL_REAL']."/css/shop-shop_shopping_cart.css";
?>
<link rel="stylesheet" type="text/css" href="{function name="parse_css" v="$dpagecss" c="$dcpagecss"}" />
<div class="page page-current page-shop-shop_shopping_cart" id="page-shop-shop_shopping_cart">
    <div class="content">
    	{foreach from=$data.goods item=item key=key name=item_name}
        <div class="card goods-item">
            <div class="card-header">
            	<div class="header-left">
            		{if $item.is_effect == 1}<input type="checkbox" name="shopping-cart-top" value="" class="input-check" data-id="{$item.podcast_id}" />{else $item.is_effect == 0}{/if}
					<span><i class="iconfont">&#xe66c;</i>{$item.podcast_name}</span>
            	</div>
            	<div class="header-right">
            		{if $item.is_effect == 1}<a href="javascript:void(0)" class="J-edit" data-id='{$item.goods_id}' data-podcast_id='{$data.podcast_id}'>编辑</a>{else $item.is_effect == 0}<a href="javascript:void(0)" class="J-delete" data-id='{$item.goods_id}' data-podcast_id='{$data.podcast_id}'>删除</a>{/if}
            	</div>
            </div>
            <div class="card-content">
                <div class="card-content-inner">
                	{if $item.is_effect == 1}<input type="checkbox" name="shopping-cart" value="" class="input-check input-check-{$item.podcast_id}"/>{else $item.is_effect == 0}<span class="invalid">失效</span>{/if}
                	<div class="inner-goods">
                		<img src="{$item.imgs}" alt="">
                		<div class="goods-text">
                			<p class="goods-title">{$item.name}</p>
                			<div class="card-footer">
                    			<div class="goods-money">
                    				<span class="money">{$item.unit_price}</span>
                    				<input type="hidden" name="input-money" class="input-money" value="{$item.unit_price}" data-id='{$item.goods_id}'>
                    			</div>
                    			<div class="goods-numb">x{$item.number}</div>
                    			<input type="hidden" name="input-money" class="input-number" value="{$item.number}">
                    		</div>
                		</div>
                		<div class="goods-edit active">
                			<div class="edit-numb">
                				<span class="lost" data-id='{$item.goods_id}'>-</span>
                                <input type="number" name="amount" value="0" class="input input-goods-num" data-id='{$item.goods_id}'>
                                <span class="add" data-id='{$item.goods_id}'>+</span>
                			</div>
                			<div class="edit-delete">
                    			<a href="javascript:void(0)" class="J-delete" data-id='{$item.goods_id}' data-podcast_id='{$data.podcast_id}'>删除</a>
                    		</div>
                		</div>
                	</div>
                </div>
            </div>
        </div>
        {foreachelse}
        <div class="null-data">暂无数据</div>
        {/foreach}
        
        </div>
    </div>
    <nav class="bar bar-tab">
    	<div class="allcheckbox">
    		<input type="checkbox" name="shopping-cart-all" value="" class="input-check"/>全选
    	</div>
    	<div class="settlement">
    		<div class="nav-text">
    			<p>合计：<span class="money">￥<em class="J-money">0</em></span></p>
    			<p class="txt">不含运费</p>
    		</div>
    		<a href="javascript:void(0)" class="button button-big J-settlement">结算</a>
    	</div>
    </nav>
</div>
<script type="text/javascript">
	var data = {
        goods_id: '{$data.goods.goods_id}',
        podcast_id: '{$data.podcast_id}',
        number: 0
    };
</script>
{include file="inc/footer.html"}